1. Field of Invention
The present invention relates to a system and method for storing data in JPEG files.
2. Description of Related Art
JPEG Files
JPEG is a file format standard used for compressing, storing, and transmitting digital image data. As used herein, the term “JPEG” refers to all versions, revisions, and releases of the format, including “JPEG” and “JPEG 2000.” The format was developed by the Joint Photographic Experts Group and it is currently the most popular and widely used image format One of JPEG's advantages is that it provides the greatest compression of any bitmap format in common use, allowing devices and users to store image files using the least amount of storage space. This compression capability is also one of the features that have made JPEG the most commonly used format for sending pictures over the Internet. Users can transmit and receive images in JPEG more quickly with a higher degree of image quality than in many other formats.
The JPEG format uses markers to break files into segments. Markers comprise a first byte having the value 0xFF. JPEG markers can be grouped into two general types; stand-alone and data. A stand-alone maker has no data other than the two bytes of the marker. A data marker is immediately followed by two bytes that indicate the number of bytes of data that follow the marker. For example, a data marker may appear as follows:                0xFF 0xNN 0xCH 0xCL        
In this example, 0xFF indicates the beginning of a JPEG segment or field, 0xNN denotes the type of field, and 0xCH and 0xCL together indicate the length of the field. The marker may be followed by data or instructions.
In addition to data for the subject image, JPEG allows non-JPEG data or application data to be stored within a JPEG file. The application data may comprise data for applications other than an application that uses image data. For example, data may be inserted into a JPEG file that indicates the setting of the camera that captured the image or the identity of the artist who created the image. In this way, one of the advantages of the JPEG format is that data other than the subject image data can be stored and transmitted in the JPEG file itself.
Embedding random data into a JPEG file offers many practical uses. For example, still images or pictures may be transmitted over the Internet with an accompanying audio file, which may be a person's voice describing the picture. This allows families to share pictures with a family member's voice, realtors to present pictures of a property with a voice description of the property, medical professionals to present diagnostic images with a verbal description or diagnosis, and many other uses.
However, one of the problems associated with storing application data in a JPEG file is the application data cannot contain marker codes. In some instances, decoders can read 0xFF in application data as a JPEG marker and cause irrecoverable failure of the decoding process. If application data in a JPEG file contains a marker code, the marker may cause the JPEG decoder to crash and the file may not be useable.
One solution to this problem is to remove all instances of 0xFF or other marker code from the application data. This would allow the data to be stored and transported in a JPEG file without the danger of crashing the JPEG decoder. However, if one or more marker codes are removed from the application data, the data is usually significantly altered and it cannot be used by its intended application program.
Therefore, a need exists for a system and method for removing marker codes from application data while the data is stored in a JPEG file and for returning the data to its original state for use with an application program.
Association of Audio and Image Files
Techniques exist for associating random data with JPEG files. For example, users wishing to create digital images with sound can attach a separate audio, e.g., .wav, file to their image file. However, .wav files break down often in that they are easily corrupted or detached during transmission and storage. Another problem with .wav files is that they require special software to be saved and used, such as Microsoft® Media software.
Other techniques for associating random data with JPEG files include techniques disclosed in U.S. Pat. No. 5,032,918, issued to Ota et al., and U.S. Pat. No. 5,815,201, issued to Hashimoto et al., wherein audio and image files are recorded separately and associated with each other. One of the disadvantages with the invention disclosed in Ota et al. is the necessity of maintaining two separate files. This can be very burdensome and vulnerable to loss of association, especially when high volumes of files are involved or when files are archived for long periods of time.
U.S. Pat. No 6,102,505 issued to McIntyre et al. creates permanent associations between image and audio data by using invisible ink. U.S. Pat. No. 5,644,557 issued to Akamine et al. and European Patent Application number EP 0 964 304 A1 issued to Nozaki et al. disclose magnetic recording on a film stock and recording data as optical pixels on a film stock, respectively. One of the problems associated with Akamine et al. and Nozaki et al. is the requirement of a physical film stock for storing a hard copy of the audio data, which is not well suited for digital image data.
Other storage techniques for audio and image data include the invention disclosed in U.S. Pat. No. 5,276,866, issued to Paolini, wherein audio data is stored as image frames in a video stream, which is then compressed. U.S. Pat. No. 5,440,677, issued to Case et al., discloses storing audio files and image files on CD-ROM with additional files to enable associated playback. The problem with Paolini and Case et al., as well as with the above patents, is they require custom programs for both sending and receiving the data before any of the data can be retrieved, displayed, or played.
In sum, a need exists for eliminating file maintenance requirements inherent in associating application data with image data. A need also exists for creating permanent associations with application data and image data in a manner that allows efficient and convenient transmission through a variety of mediums, such as the Internet. A further need exists for efficiently and conveniently combining application data and image data into a single file. A need further exists for storing application data with image data without requiring custom or non-widely used applications for storing, retrieving, displaying, or using application and image data. The present invention provides a system and method that fulfills these needs by approaching the problem in a way that is not suggested by the prior art.